package com.liantong.common.vo;

import java.io.File;
import java.util.Arrays;

import com.liantong.common.po.App;

public class InsertAppInfo {

	private App app;

	private File avatar;

	private String avatarName;

	private String avatarPath;

	private File apk;

	private String apkName;

	private String apkPath;

	private File[] previews;

	private String[] previewNames;

	private String previewPath;

	private String contextPath;

	private boolean rayhovRecommend;

	private boolean installationNecessary;

	/**
	 * @return the app
	 */
	public App getApp() {
		return app;
	}

	/**
	 * @param app
	 *            the app to set
	 */
	public void setApp(App app) {
		this.app = app;
	}

	/**
	 * @return the avatar
	 */
	public File getAvatar() {
		return avatar;
	}

	/**
	 * @param avatar
	 *            the avatar to set
	 */
	public void setAvatar(File avatar) {
		this.avatar = avatar;
	}

	/**
	 * @return the avatarName
	 */
	public String getAvatarName() {
		return avatarName;
	}

	/**
	 * @param avatarName
	 *            the avatarName to set
	 */
	public void setAvatarName(String avatarName) {
		this.avatarName = avatarName;
	}

	/**
	 * @return the avatarPath
	 */
	public String getAvatarPath() {
		return avatarPath;
	}

	/**
	 * @param avatarPath
	 *            the avatarPath to set
	 */
	public void setAvatarPath(String avatarPath) {
		this.avatarPath = avatarPath;
	}

	/**
	 * @return the apk
	 */
	public File getApk() {
		return apk;
	}

	/**
	 * @param apk
	 *            the apk to set
	 */
	public void setApk(File apk) {
		this.apk = apk;
	}

	/**
	 * @return the apkName
	 */
	public String getApkName() {
		return apkName;
	}

	/**
	 * @param apkName
	 *            the apkName to set
	 */
	public void setApkName(String apkName) {
		this.apkName = apkName;
	}

	/**
	 * @return the apkPath
	 */
	public String getApkPath() {
		return apkPath;
	}

	/**
	 * @param apkPath
	 *            the apkPath to set
	 */
	public void setApkPath(String apkPath) {
		this.apkPath = apkPath;
	}

	/**
	 * @return the previews
	 */
	public File[] getPreviews() {
		return previews;
	}

	/**
	 * @param previews
	 *            the previews to set
	 */
	public void setPreviews(File[] previews) {
		this.previews = previews;
	}

	/**
	 * @return the previewNames
	 */
	public String[] getPreviewNames() {
		return previewNames;
	}

	/**
	 * @param previewNames
	 *            the previewNames to set
	 */
	public void setPreviewNames(String[] previewNames) {
		this.previewNames = previewNames;
	}

	/**
	 * @return the previewPath
	 */
	public String getPreviewPath() {
		return previewPath;
	}

	/**
	 * @param previewPath
	 *            the previewPath to set
	 */
	public void setPreviewPath(String previewPath) {
		this.previewPath = previewPath;
	}

	/**
	 * @return the contextPath
	 */
	public String getContextPath() {
		return contextPath;
	}

	/**
	 * @param contextPath
	 *            the contextPath to set
	 */
	public void setContextPath(String contextPath) {
		this.contextPath = contextPath;
	}

	/**
	 * @return the rayhovRecommend
	 */
	public boolean isRayhovRecommend() {
		return rayhovRecommend;
	}

	/**
	 * @param rayhovRecommend
	 *            the rayhovRecommend to set
	 */
	public void setRayhovRecommend(boolean rayhovRecommend) {
		this.rayhovRecommend = rayhovRecommend;
	}

	/**
	 * @return the installationNecessary
	 */
	public boolean isInstallationNecessary() {
		return installationNecessary;
	}

	/**
	 * @param installationNecessary
	 *            the installationNecessary to set
	 */
	public void setInstallationNecessary(boolean installationNecessary) {
		this.installationNecessary = installationNecessary;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((apk == null) ? 0 : apk.hashCode());
		result = prime * result + ((apkName == null) ? 0 : apkName.hashCode());
		result = prime * result + ((apkPath == null) ? 0 : apkPath.hashCode());
		result = prime * result + ((app == null) ? 0 : app.hashCode());
		result = prime * result + ((avatar == null) ? 0 : avatar.hashCode());
		result = prime * result + ((avatarName == null) ? 0 : avatarName.hashCode());
		result = prime * result + ((avatarPath == null) ? 0 : avatarPath.hashCode());
		result = prime * result + ((contextPath == null) ? 0 : contextPath.hashCode());
		result = prime * result + (installationNecessary ? 1231 : 1237);
		result = prime * result + Arrays.hashCode(previewNames);
		result = prime * result + ((previewPath == null) ? 0 : previewPath.hashCode());
		result = prime * result + Arrays.hashCode(previews);
		result = prime * result + (rayhovRecommend ? 1231 : 1237);
		return result;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		InsertAppInfo other = (InsertAppInfo) obj;
		if (apk == null) {
			if (other.apk != null)
				return false;
		} else if (!apk.equals(other.apk))
			return false;
		if (apkName == null) {
			if (other.apkName != null)
				return false;
		} else if (!apkName.equals(other.apkName))
			return false;
		if (apkPath == null) {
			if (other.apkPath != null)
				return false;
		} else if (!apkPath.equals(other.apkPath))
			return false;
		if (app == null) {
			if (other.app != null)
				return false;
		} else if (!app.equals(other.app))
			return false;
		if (avatar == null) {
			if (other.avatar != null)
				return false;
		} else if (!avatar.equals(other.avatar))
			return false;
		if (avatarName == null) {
			if (other.avatarName != null)
				return false;
		} else if (!avatarName.equals(other.avatarName))
			return false;
		if (avatarPath == null) {
			if (other.avatarPath != null)
				return false;
		} else if (!avatarPath.equals(other.avatarPath))
			return false;
		if (contextPath == null) {
			if (other.contextPath != null)
				return false;
		} else if (!contextPath.equals(other.contextPath))
			return false;
		if (installationNecessary != other.installationNecessary)
			return false;
		if (!Arrays.equals(previewNames, other.previewNames))
			return false;
		if (previewPath == null) {
			if (other.previewPath != null)
				return false;
		} else if (!previewPath.equals(other.previewPath))
			return false;
		if (!Arrays.equals(previews, other.previews))
			return false;
		if (rayhovRecommend != other.rayhovRecommend)
			return false;
		return true;
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "InsertAppInfo [app=" + app + ", avatar=" + avatar + ", avatarName=" + avatarName + ", avatarPath=" + avatarPath + ", apk="
				+ apk + ", apkName=" + apkName + ", apkPath=" + apkPath + ", previews=" + Arrays.toString(previews) + ", previewNames="
				+ Arrays.toString(previewNames) + ", previewPath=" + previewPath + ", contextPath=" + contextPath + ", rayhovRecommend="
				+ rayhovRecommend + ", installationNecessary=" + installationNecessary + "]";
	}

}
